﻿
@{
    ViewBag.Title = "GetSettlementItems";
    Layout = "~/Views/Shared/_Form.cshtml";
}

<div class="gridPanel" style="margin-top:10px;">
    <div>
        <table class="form">
            <tr>
                <th class="formTitle">收费名称：</th>
                <td class="formValue">
                    <input id="sfmc" type="text" class="form-control" placeholder="收费名称" />
                </td>
                <td class="formValue">
                    &nbsp;&nbsp;
                    <input type="button" id="btn_search" class="btn btn-primary" value=" 查 询 " />
                </td>
            </tr>
        </table>
    </div>
    <table id="gridList"></table>
    <div id="gridPager"></div>
</div>
<script>
    var zyh = $.request("zyh");
    var dlCode = $.request("dlCode");
    var jsnms = $.request("jsnms");
    $(function () {
        gridInit();
    });
    $('#btn_search').click(function () {
        //$("#gridList").clearGridData();

        var mc = $('#sfmc').val();
        $("#gridList").jqGrid('setGridParam', {
            postData: { zyh: zyh, dlCode: dlCode, jsnms: jsnms, mc: mc },
        }).trigger('reloadGrid'); //重新加载当前表格
    });
    function gridInit() {
        var $gridList = $("#gridList");
        $gridList.dataGrid({
            postData: { zyh: zyh, dlCode: dlCode,jsnms: jsnms,mc:"" },
            url: "/HospitalizationManage/Settlement/GetSettleItemFrom",
            height: $(window).height() - 120,
            colModel: [
                { label: '收费大类', name: 'dlmc', align: 'center', width: 80 },
                { label: '属性', name: 'zfxz', align: 'center', width: 40 },
                { label: '收费名称', name: 'sfxmmc', align: 'left', width: 150 },
                { label: '规格', name: 'gg', align: 'center', width: 60 },
                { label: '单位', name: 'jfdw', align: 'center', width: 60 },
                {
                    label: '单价', name: 'dj', align: 'center', width: 60, formatter: "number"
                    , formatoptions: { decimalPlaces: 2, defaultValue: '0.0000' }
                },
                { label: '数量', name: 'sl', align: 'center', width: 30 },
                { label: 'zyh', name: 'zyh', align: 'center', hidden: true },
                {
                    label: '费用', name: 'je', align: 'center', width: 60, formatter: "number"
                    , formatoptions: { decimalPlaces: 2, defaultValue: '0.0000' }
                },
                { label: '是否自费', name: 'zzfbz', align: 'center', width: 50 },
                { label: '计价日期', name: 'tdrq', align: 'center', width: 100 },

            ],
            pager: "#gridPager",
            sortname: 'tdrq',
            viewrecords: true,
            //rowNum:20
        });
    }
</script>

